# utils/lang_utils.py

LANG_MAP = {
    "zh": {
        "Settings": "设置",
        "Search system settings": "搜索系统设置项",
        "User Account": "君泺荣光",
        "WLAN": "WLAN",
        "Bluetooth": "蓝牙",
        "Mobile Network": "移动网络",
        "More Connectivity": "互联互通",
        "VPN": "VPN",
        "More Connection": "更多连接",
        "System Info": "系统个性化",
        "Lock Screen": "锁屏",
        "Notification & Status Bar": "通知与状态栏",
        "Display & Brightness": "显示与亮度",
        "Sound & Touch": "声音与触感",
        "Biometric & Password": "指纹、面部与密码",
        "Privacy & Security": "隐私与安全",
        "App Settings": "应用设置",
        "Power & Battery": "省电与电池",
        "Xiaoai": "小爱同学",
        "More Settings": "更多设置",
        "Feedback": "问题反馈"
    },
    "en": {
        "Settings": "Settings",
        "Search system settings": "Search system settings",
        "User Account": "User Account",
        "WLAN": "WLAN",
        "Bluetooth": "Bluetooth",
        "Mobile Network": "Mobile Network",
        "More Connectivity": "More Connectivity",
        "VPN": "VPN",
        "More Connection": "More Connection",
        "System Info": "System Info",
        "Lock Screen": "Lock Screen",
        "Notification & Status Bar": "Notification & Status Bar",
        "Display & Brightness": "Display & Brightness",
        "Sound & Touch": "Sound & Touch",
        "Biometric & Password": "Biometric & Password",
        "Privacy & Security": "Privacy & Security",
        "App Settings": "App Settings",
        "Power & Battery": "Power & Battery",
        "Xiaoai": "Xiaoai Assistant",
        "More Settings": "More Settings",
        "Feedback": "Feedback"
    },
    "fr": {
        "Settings": "Paramètres",
        "Search system settings": "Rechercher les paramètres système",
        "User Account": "Compte utilisateur",
        "WLAN": "WLAN",
        "Bluetooth": "Bluetooth",
        "Mobile Network": "Réseau mobile",
        "More Connectivity": "Connectivité supplémentaire",
        "VPN": "VPN",
        "More Connection": "Plus de connexions",
        "System Info": "Informations système",
        "Lock Screen": "Verrouillage d'écran",
        "Notification & Status Bar": "Notifications et barre d'état",
        "Display & Brightness": "Affichage et luminosité",
        "Sound & Touch": "Son et tactile",
        "Biometric & Password": "Authentification biométrique et mot de passe",
        "Privacy & Security": "Confidentialité et sécurité",
        "App Settings": "Paramètres des applications",
        "Power & Battery": "Alimentation et batterie",
        "Xiaoai": "Assistant Xiaoai",
        "More Settings": "Paramètres supplémentaires",
        "Feedback": "Commentaires"
    }
}

def get_translated_text(key, lang="zh"):
    """
    获取指定语言的翻译文本
    :param key: 文本标识符（英文键）
    :param lang: 目标语言
    :return: 对应语言的文本
    """
    return LANG_MAP.get(lang, LANG_MAP["zh"]).get(key, key)
